home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_15_1987_Transactor_Publishing.d64
/
chroma scale
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
474b
|
18 lines
110 rem** routine to generate chromatic
120 rem** scale register values (hi/lo)
130 rem** by arne storjohann - 86,05,04
140 :
150 dim lo%(95),hi%(95): g=2^(1/12)
160 f=3520*g*g: d=0.06095948: b=256
170 for i = 95 to 0 step -1: n=f/d: hi%(i)=n/b
180 lo%(i)=n-hi%(i)*b: f=f/g: next
190 :
200 rem ** demo **
210 :
220 s=54272: for i = s to s+15: poke i,0: next
230 poke s+5,96: poke s+6,251: poke s+4,33
240 poke s+24,15: for i=-72 to 72
250 x=71-abs(i)+16: poke s,lo%(x)
260 poke s+1,hi%(x):for j=1to200: next
270 next: poke s+4,32: end